package main;

import java.util.concurrent.ExecutorService;

import com.spider.SpiderExecuterService;
import com.spider.task.SpiderTask;
import com.spider.util.SpiderCondition;

public class GetJobDetail implements Runnable {

	/**
	 * @param args
	 */
	public void getJobDetail() {
		ExecutorService spiderPool = SpiderExecuterService.getExecutePool();
		while(SpiderCondition.EMAIL_END_PAGE > SpiderTask.getPage()){
			spiderPool.execute(new SpiderTask());
			try {
				Thread.sleep(4000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		spiderPool.shutdown();
	}

	public void run() {
		getJobDetail();
	}

}
